import { IMenu } from "@lgq/types";
import { create } from "zustand";

export const useStore = create<{
  path: string;
  menuItems: IMenu.MenuItem[];
  updatePath: (path: string) => void;
  updateMenuItems: (menuItems: IMenu.MenuItem[]) => void;
}>((set) => ({
  path: "",
  menuItems: [],
  updatePath: (path: string) => set({ path }),
  updateMenuItems: (menuItems: IMenu.MenuItem[]) => set({menuItems})
}));


export const usePathStore = create(() => ({ path : '' }));